import request from '@/utils/request'
import qs from 'qs'
// 获取热门搜索列表
export const reqSearch = () => {
    return request({
      url: "/xhr/search/init.json",
    });
  };
  // 获取联想出来的关键字
  export const reqSearchItem = (data) => {
    return request({
      url: "/xhr/search/searchAutoComplete.json ",
      method: "POST",
      data: qs.stringify(data),
      headers: {
        "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
      },
    });
  };
//   商品详情
  export const reqSearchDetail = (data) => {
 
    return request({
      url: `/xhr/search/search.json?__timestamp=${Date.now()}`,
      params: data,
    });
  };